<h2 class="dialog_title"><span>Info Point Nilai</span></h2>
<div class="dialog_content">
<div style="border-bottom: 1px solid #CCC">
<?php $NILAI_COL = nilai_select2(false, "DETACHIEV_ID='$detachievID'", "NILAI_ID")?>
<?php $REPORT = array()?>
<?php while ($cc = mysql_fetch_assoc($NILAI_COL) ){ $REPORT[] = $cc;  } ?>

<table width="100%" border="0" cellpadding="5" cellspacing="0" style="position:relative">
<?php for($i=0; $i<count($REPORT); $i++) : ?>
	<?php $res_nilai = mysql_fetch_assoc(nilai_load($REPORT[$i]['NILAI_ID']))?>
    <?php $res_rnp = mysql_fetch_assoc(rnp_load($res_nilai['REWARD_ID']))?>
    <?php $res_deprepel = mysql_fetch_assoc(deprepel_load($res_nilai['DETACHIEV_ID']))?>
    <?php $res_prepel = mysql_fetch_assoc(perpel_load($res_deprepel['ACHIEV_ID']))?>
	<tbody id="NILAI-TB-<?php echo $REPORT[$i]['NILAI_ID']?>" style="display:<?php echo $i>0? 'none' : 'table-body'?>">
    
        <tr <?php echo tag_zebra($z++)?>>
          <td align="right">Nilai ID :</td>
          <td><strong><?php echo $res_nilai['NILAI_ID']?></strong> 
          	<div style="display:inline; margin-left:40px">
          	<?php if ($REPORT[$i-1]) : ?>
            	<a onclick="$('NILAI-TB-<?php echo $REPORT[$i]['NILAI_ID']?>').setStyle('display', 'none'); 
                			$('NILAI-TB-<?php echo $REPORT[$i-1]['NILAI_ID']?>').setStyle('display', 'table-row-group');" 
                   class="fake clickable">&lt;&lt;Prev</a>
            <?php endif;?>
            <?php if ($REPORT[$i+1]) : ?>
            	<a onclick="$('NILAI-TB-<?php echo $REPORT[$i]['NILAI_ID']?>').setStyle('display', 'none'); 
                			$('NILAI-TB-<?php echo $REPORT[$i+1]['NILAI_ID']?>').setStyle('display', 'table-row-group');" 
                   class="fake clickable">Next&gt;&gt;</a>
            <?php endif;?>
            </div>
          </td>
          </tr>
        <tr <?php echo tag_zebra($z++)?>>
          <td width="35%" align="right">Tipe Pres/Pel </td>
          <td><?php $jenis = $res_prepel['ACHIEV_JENIS']?>
              <strong><?php echo strtolower($res_prepel['ACHIEV_JENIS'])==='prestasi'? "Prestasi" : "Pelanggaran"?></strong></td>
          </tr>
        <tr <?php echo tag_zebra($z++)?>>
          <td align="right">Bidang Pres/Pel :</td>
          <td><strong><?php echo $res_prepel['ACHIEV_BIDANG']?></strong></td>
          </tr>
        <tr <?php echo tag_zebra($z++)?>>
          <td align="right">Tingkat Pres/Pel : </td>
          <td><strong><?php echo $res_deprepel['DETACHIEV_TINGKAT'] ?></strong></td>
          </tr>
        <tr <?php echo tag_zebra($z++)?>>
          <td align="right">Kategori Pres/Pel : </td>
          <td><strong><?php echo $res_deprepel['DETACHIEV_NAMA']?></strong></td>
          </tr>
        <tr <?php echo tag_zebra($z++)?>>
          <td align="right">Tipe R/P  :</td>
          <td><strong><?php echo strtolower($res_rnp['REWARD_JENIS'])==='reward'? "Reward":"Punishment"?></strong></td>
          </tr>
        <tr <?php echo tag_zebra($z++)?>>
          <td align="right">Kategori R/P : </td>
          <td><strong><?php echo $res_rnp['REWARD_NAMA']?></strong></td>
          </tr>
        <tr <?php echo tag_zebra($z++)?>>
          <td align="right">Point :</td>
          <td><strong><?php echo $res_nilai['NILAI_POINT']?></strong></td>
          </tr>
        <tr <?php echo tag_zebra($z++)?>>
          <td align="right">Range Min : </td>
          <td align="left"><strong><?php echo $res_nilai['NILAI_MIN']?></strong></td>
          </tr>
        <tr <?php echo tag_zebra($z++)?>>
          <td align="right">Range Max : </td>
          <td align="left"><strong><?php echo $res_nilai['NILAI_MAX']?></strong></td>
          </tr>
<?php endfor; ?>
</table>
</div>
<div class="dialog_buttons"><input type="button" value="Close" name="close" onclick="FBModal_hide()" /></div>
</div>